DimenFill

class DimenFill(val initialBaseDp: ERROR CLASS: Symbol not found for Dp, val sortedCustomEntries: List<CustomDpEntry> = emptyList(), val ignoreMultiWindows: Boolean = false, val applyAspectRatio: Boolean = false, val customSensitivityK: Float? = null)

EN A Stable class that allows defining custom dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).

The Dp value is resolved at composition (Compose) and uses the base value or a custom value, applying dynamic scaling at the end.

PT Classe Stable que permite a definição de dimensões customizadas baseadas em qualificadores de tela (UiModeType, Largura, Altura, Smallest Width).

O valor Dp é resolvido na composição (Compose) e usa o valor base ou um valor customizado, aplicando o dimensionamento dinâmico no final.

Constructors

Link copied to clipboard
private constructor(initialBaseDp: ERROR CLASS: Symbol not found for Dp, sortedCustomEntries: List<CustomDpEntry> = emptyList(), ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null)
constructor(initialBaseDp: ERROR CLASS: Symbol not found for Dp)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val flhdp: ERROR CLASS: Symbol not found for Dp

EN The final Dp value resolved in Compose (Screen Height). PT O valor final Dp resolvido no Compose (Altura da Tela).

Link copied to clipboard

EN The final Pixel (Float) value resolved in Compose (Screen Height). PT O valor final em Pixels (Float) resolvido no Compose (Altura da Tela).

Link copied to clipboard
val flsdp: ERROR CLASS: Symbol not found for Dp

EN The final Dp value resolved in Compose (Smallest Width). PT O valor final Dp resolvido no Compose (Smallest Width).

Link copied to clipboard

EN The final Pixel (Float) value resolved in Compose (Smallest Width). PT O valor final em Pixels (Float) resolvido no Compose (Smallest Width).

Link copied to clipboard
val flwdp: ERROR CLASS: Symbol not found for Dp

EN The final Dp value resolved in Compose (Screen Width). PT O valor final Dp resolvido no Compose (Largura da Tela).

Link copied to clipboard

EN The final Pixel (Float) value resolved in Compose (Screen Width). PT O valor final em Pixels (Float) resolvido no Compose (Largura da Tela).

Link copied to clipboard
Link copied to clipboard
private val initialBaseDp: ERROR CLASS: Symbol not found for Dp
Link copied to clipboard

Functions

Link copied to clipboard
fun aspectRatio(enable: Boolean = true, sensitivityK: Float? = null): DimenFill

EN Allow applying aspect ratio based constraint scaling. PT Permite aplicar o redimensionamento baseado na proporção da tela.

Link copied to clipboard
fun ignoreMultiWindows(ignore: Boolean = true): DimenFill

EN Allow ignoring the constraint scaling based on multi-window resizing properties. PT Permite ignorar o dimensionamento para os layouts de múltiplas janelas (divisão de tela).

Link copied to clipboard

EN Adds a new entry and re-sorts the list. Sorting is crucial: first by priority (ascending), and then by dpQualifierEntry.value (descending) so that larger qualifiers (e.g., sw600dp) are checked before smaller qualifiers (e.g., sw320dp).

Link copied to clipboard
private fun resolve(qualifier: DpQualifier): ERROR CLASS: Symbol not found for Dp

EN Resolves the final dimension. This is the Composable part that reads the current configuration and decides which Dp to use.

Link copied to clipboard
private fun resolvePx(qualifier: DpQualifier): Float
Link copied to clipboard
fun screen(orientation: Orientation = Orientation.DEFAULT, customValue: ERROR CLASS: Symbol not found for Dp, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenFill
fun screen(orientation: Orientation = Orientation.DEFAULT, customValue: Number, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 4: Orientation. This is an overload that accepts an Int for customValue.

fun screen(type: UiModeType, customValue: ERROR CLASS: Symbol not found for Dp, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH).

fun screen(type: UiModeType, customValue: Number, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH). This is an overload that accepts an Int for customValue.

fun screen(type: DpQualifier, value: Int, customValue: ERROR CLASS: Symbol not found for Dp, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction.

fun screen(type: DpQualifier, value: Int, customValue: Number, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction. This is an overload that accepts an Int for customValue.

fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, orientation: Orientation? = Orientation.DEFAULT, customValue: ERROR CLASS: Symbol not found for Dp, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w).

fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Number, customValue: Number, finalQualifierResolver: DpQualifier? = null, orientation: Orientation? = Orientation.DEFAULT, inverter: Inverter? = Inverter.DEFAULT): DimenFill

EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w). This is an overload that accepts an Int for customValue.